package com.example.xadmin.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * <p>
 * 
 * </p>
 *
 * @author Administrator
 * @since 2020-04-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_role_user")
public class SysRoleUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = USERID, type = IdType.INPUT)
    private Integer userId;

    @TableField(ROLEID)
    private Integer roleId;


    public static final String USERID = "`userId`";

    public static final String ROLEID = "`roleId`";


    public static final String USERID_COMMENT = "";

    public static final String ROLEID_COMMENT = "";



    public static SysRoleUser of(Object obj) {
        SysRoleUser e = new SysRoleUser();
        BeanUtils.copyProperties(obj, e);
        return e;
    }

    public static QueryWrapper<SysRoleUser> queryWrapper(Object obj) {
        return new QueryWrapper<>(of(obj));
    }

}
